package controllers;

//Author Tim Sterckx c1025687
import javax.swing.JFrame;

import controllers.uiControllers.MainViewController;
import controllers.uiControllers.PortalController;

import views.CheckinView;
import core.logic.services.CheckinOpvragenService;
import core.models.dataModels.CheckinOpvragenModel;

public class CheckinOpvragenController {

	private static JFrame scherm;

	public static void showView() {
		CheckinOpvragenModel model = CheckinOpvragenService.getCheckinOpvragenModel();

		scherm = new CheckinView(model);
		// scherm.pack();
		// scherm.setVisible(true);
		MainViewController.showView(scherm);

	}

	public static void handleView(CheckinOpvragenModel modelIn) {
		CheckinOpvragenService.getResultCheckin(modelIn);
	}

	public static void closeView() {
		MainViewController.removeView(scherm);
		scherm.dispose();
		PortalController.showView();
	}
}
